﻿using System.Net;
using static SmartSite.Common.CheckingNullArgument;


namespace SmartSite.Network
{
    public class AsyncSocketStateEventArgs : SocketStateEventArgs
    {
        public AsyncSocketStateEventArgs(IAsyncSocket socket, IPEndPoint remoteEndPoint, byte[] buffer)
            : base(
                 CheckingNull(socket, nameof(socket)),
                 CheckingNull(remoteEndPoint, nameof(remoteEndPoint)),
                 CheckingNull(buffer, nameof(buffer))
            )
        { }

        public AsyncSocketStateEventArgs(IAsyncSocket socket, EndPoint remoteEndPoint, byte[] buffer)
            : base(
                 CheckingNull(socket, nameof(socket)),
                 CheckingNull((IPEndPoint)remoteEndPoint, nameof(remoteEndPoint)),
                 CheckingNull(buffer, nameof(buffer))
            )
        { }
    }
}
